import { reactive, ref } from 'vue';
import { defineStore } from 'pinia';

export const useCacheDataStore = defineStore('cache-data', () => {
  // const userData = {
  //   page: ref(1),
  //   size: ref(10),
  //   list: ref<API.user.EntitySchema[]>()
  // };

  // 会员分页列表 - pageData
  const userData = reactive({
    page: 1,
    size: 999,
    list: [] as API.user.EntitySchema[]
  });

  // 商品分类 - treeData
  const goodsCategoryTreData = ref<API.goodsCategory.TreeSchema[]>([]);

  return {
    userData,
    goodsCategoryTreData
  };
});
